local skill = fk.CreateSkill {
  name = "lvshi__hezhen",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["lvshi__hezhen"] = "赫震",
  [":lvshi__hezhen"] = "锁定技，弃牌阶段开始前，若你于此回合造成过伤害，你摸一张牌并将此阶段改为出牌阶段。",

  ["$lvshi__hezhen1"] = "胸有怒涛如烈火，偃月刀出，天地失色！",
  ["$lvshi__hezhen2"] = "天下碌碌之辈，安敢小觑关某！",
}

skill:addEffect(fk.EventPhaseChanging, {
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(skill.name) and data.phase == Player.Discard and not data.skipped then
      return #player.room.logic:getActualDamageEvents(1, function (e)
        if (e.data.from and e.data.from == player) then
          return true
        end
      end, Player.HistoryTurn) > 0
    end
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(1)
    data.phase = Player.Play
  end,
})


return skill
